package cn.jiaqiang.chatgpt.data.domain.openai.model.valobj;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * Created with IntelliJ IDEA.
 * Description: 账户状态
 * User: 86187
 * Date: 2024-04-02
 * Time: 16:38
 */
@Getter
@AllArgsConstructor
public enum UserAccountStatusVO {
    AVAILABLE(0, "可用"),
    FREEZE(1, "冻结"),
    ;

    private final Integer code;
    private final String info;

    public static UserAccountStatusVO getInfo(Integer code) {
        if (code == 0) {
            return UserAccountStatusVO.AVAILABLE;
        }
        return UserAccountStatusVO.FREEZE;
    }
}
